/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.nys.conci.cliente.entidad;

import com.nys.conci.base.ObjetoBase;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;

/**
 *
 * @author Yeudy10
 */
@Entity
@Table(name = "duracion", schema = "public")
@SequenceGenerator(name = "ID_SEQ", sequenceName = "seq_duracion", allocationSize = 1)
public class Duracion extends ObjetoBase implements Serializable {

    //<<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>>
    //<<<>>>><<<>>>><<<>>>><<<>>>>  VARIABLES  <<<>>>><<<>>>><<<>>>><<<>>>><<<>>>>
    //<<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>>    
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ID_SEQ")
    private Integer id_duracion;
    private String leyenda;
    private BigDecimal valor;
    
    //<<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>>
    //<<<>>>><<<>>>><<<>>>><<<>>>>  CONSTRUCTOR  <<<>>>><<<>>>><<<>>>><<<>>>><<<>>>>
    //<<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>>
    public Duracion() {
    }

    public Duracion(Integer id_duracion) {
        this.id_duracion = id_duracion;
    }
    //<<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>>
    //<<<>>>><<<>>>><<<>>>><<<>>>>  GETS & SETS  <<<>>>><<<>>>><<<>>>><<<>>>><<<>>>>
    //<<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>><<<>>>>

    /**
     * @return the id_duracion
     */
    public Integer getId_duracion() {
        return id_duracion;
    }

    /**
     * @param id_duracion the id_duracion to set
     */
    public void setId_duracion(Integer id_duracion) {
        this.id_duracion = id_duracion;
    }

    /**
     * @return the leyenda
     */
    public String getLeyenda() {
        return leyenda;
    }

    /**
     * @param leyenda the leyenda to set
     */
    public void setLeyenda(String leyenda) {
        this.leyenda = leyenda;
    }

    /**
     * @return the valor
     */
    public BigDecimal getValor() {
        return valor;
    }

    /**
     * @param valor the valor to set
     */
    public void setValor(BigDecimal valor) {
        this.valor = valor;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Duracion other = (Duracion) obj;
        if (this.id_duracion != other.id_duracion && (this.id_duracion == null || !this.id_duracion.equals(other.id_duracion))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 97 * hash + (this.id_duracion != null ? this.id_duracion.hashCode() : 0);
        return hash;
    }
           
}
